package cardmanager.enums;

public enum CardAttribute { Dark(0x20),Divine(0x40),Earth(1),Fire(4),Light(0x10),Water(2),Wind(8);
private int value;

private CardAttribute(int value) 
{
        this.value = value;
}
public int getValue()
{
	return value;
}
public static CardAttribute fromInt(int code) {
	
	switch(code) 
	{
		case 0x20:
			return Dark;
		case 0x40:
			return Divine;
		case 1:
			return Earth;
		case 4:
			return Fire;
		case 0x10:
			return Light;
		case 2:
			return Water;
		case 8:
			return Wind;
		}
	return null;
}

}